<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .father{
            width: 600px;
            height: 600px;
            background-color: red;
            display: grid;
            /* 等分割块 */
            grid-template-columns: repeat(3,1fr);
            grid-template-rows:  repeat(2,1fr);
            grid-gap:50px 10px;

            /* 单元格水平居中 */
            justify-content: center;
            /* 单元格垂直居中 */
            align-content: center;
            
            /* 子元素在单元格中居中
            justify-items: center;
            align-items: center; */
        }
        .father div{
            width: 100px;
            height: 100px;
            border: 1px solid #333;
            background: #fff;
            justify-self:start;
            align-self: center;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class=""></div>
        <div class=""></div>
        <div class=""></div>
        <div class=""></div>
        <div class=""></div>
        <div class=""></div>
    </div>
</body>
</html>